<?php
    $query = "SELECT * FROM groups";
    $found = mysqli_query($dbc, $query) or die("Error");
    $array = array();
    $add = 'true';
        while($data = mysqli_fetch_array($found)){
            foreach ($array as $string){
                if($string == $data['Company_Name']){
                    $add = 'false';
                }
            }
            if($add == 'true'){
                $array[] = $data['Company_Name'];
            }else{
                $add = 'true';
            }
        }

        foreach($array as $string){
            if($row['Employer'] == $string){
                echo '<option selected value="'.$string.
                '">'.$string.'</option>';
                }else
                echo '<option value="'.$string.
                '">'.$string.'</option>';
        }
        
?>

